package com.kuang.controller;

import com.kuang.pojo.ClassCourses;
import com.kuang.service.ClassCourseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
@RequestMapping("/classCourse")
public class ClassCourseController {

    @Autowired
    @Qualifier("ClassCourseServiceImpl")
    private ClassCourseService classCourseService;

    @RequestMapping("/allClassCourse")
    public String list(Model model){
        List<ClassCourses> list = classCourseService.queryAllClassCourse();
        model.addAttribute("list", list);
        return "allClassCourse";
    }

    @RequestMapping("/allSelectClassCourse")
    public String selectList(Model model){
        List<ClassCourses> list = classCourseService.queryClassCourseByClno(0);
        model.addAttribute("list", list);
        return "allSelectClassCourse";
    }






}
